package gemini.castor.ui.client.page.context.shoppingcartpreview;

import gemini.basic.model.MonthlyPoint;

import java.util.List;

import com.google.gwt.validation.client.interfaces.IValidatable;

public class ShoppingCartPreviewObject implements IValidatable {

	private List<ShoppingCartPreviewItem> items;

	private MonthlyPoint monthlyPoint;
	private int discountScale;
	private String orderMonth;
	private int point;
	
	public String getMonthlyPointString(){
		String result = "0(0)";
		if (monthlyPoint != null) {
			result = (monthlyPoint.getPersonalPoint() + monthlyPoint
					.getGroupPoint())
					+ "("
					+ monthlyPoint.getPersonalPoint()
					+ ")";
		}
		return result;
	}

	public List<ShoppingCartPreviewItem> getItems() {
		return items;
	}

	public void setItems(List<ShoppingCartPreviewItem> items) {
		this.items = items;
	}

	public MonthlyPoint getMonthlyPoint() {
		return monthlyPoint;
	}

	public void setMonthlyPoint(MonthlyPoint monthlyPoint) {
		this.monthlyPoint = monthlyPoint;
	}

	public int getDiscountScale() {
		return discountScale;
	}

	public void setDiscountScale(int discountScale) {
		this.discountScale = discountScale;
	}

	public String getOrderMonth() {
		return orderMonth;
	}

	public void setOrderMonth(String orderMonth) {
		this.orderMonth = orderMonth;
	}

	public void setPoint(int point) {
		this.point = point;
	}

	public int getPoint() {
		return point;
	}
}
